{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "fb962b0a",
   "metadata": {},
   "source": [
    "# 第二周学习内容：\n",
    "**A.python的第一行代码**\n",
    "\n",
    "**B.观察标准库**\n",
    "\n",
    "## 一、重要资源：\n",
    "> [PYTHON官网]（httpps://python.org）\n",
    "> [智超老师的python博客]（https://www.cnblogs.com/xuzhichao）\n",
    "    \n",
    "## 二、 本周学习内容\n",
    "\n",
    "### 1.[pycharm]（https://www.jetbrains.com/pycharm/）\n",
    "\n",
    "**<font color=blue size=3> ①、区分IDE与IDLE?</font>** \n",
    "\n",
    "> A.项目管理类的IDE   \n",
    "*** \n",
    "\n",
    "* IDE，即集成开发环境（IDE，Integrated Development Environment ）是用于 ``` 提供程序开发环境的应用程序 ```。  \n",
    "  一般包括代码编辑器、编译器、调试器和图形用户界面等工具。集成了代码编写功能、分析功能、编译功能、调试功能等一体化的开发软件服务套。\n",
    "\n",
    "***\n",
    "\n",
    "> B.IDLE:  \n",
    "*** \n",
    "\n",
    "* IDLE 是一个纯 Python 下自带的简洁的集成开发环境(IDE)。\n",
    "\n",
    "***\n",
    "\n",
    "**<font color=blue size=3> ②、[github education pack](https://education.github.com/pack)</font>**   \n",
    "   > * 可获取免费一年 专业版享用，注册好学生账号后，就要用中大南方的邮箱（企业微信可见）来登录获取pycharm激活邮箱,为下周可以使用pycharm做准备。   \n",
    "\n",
    "\n",
    "### 2.pycharm下载官网安装和jupyter notebook的安装学习\n",
    "<font color=pink size=4> 注意事项：下载专业版</font>\n",
    "\n",
    "### 3.jupyter notebook的使用\n",
    "\n",
    "**<font color=blue size=3>①、什么是jupyter notebook？</font>** \n",
    "\n",
    "1、jupyter是一个基于web的IDE（集成开发环境）。\n",
    "\n",
    "2、兼具脚本操作和交互式操作的特性。\n",
    "\n",
    "3、笔记式编辑代码和运行，便于调试，便于保存。\n",
    "\n",
    "**<font color=blue size=3>②、在cmd运行jupyter notebook？</font>**   \n",
    "1、安装\n",
    "![安装图片1](https://img2018.cnblogs.com/blog/1468570/201908/1468570-20190830215505932-620320681.png)\n",
    "![安装图片2](https://img2018.cnblogs.com/blog/1468570/201908/1468570-20190830215639578-1774588818.png)  \n",
    "\n",
    "2、运行\n",
    "![运行图片1](https://img2018.cnblogs.com/blog/1468570/201908/1468570-20190830215921996-282484760.png)\n",
    "\n",
    "> 图源来自：智超老师blog\n",
    "\n",
    "### 4.变量（数字（Numbers）、字符串（Strings）、对象）\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "cef4df58",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "4"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 数字（Numbers），就像运用加减乘除等一些数学公式可以得出计算答案。  \n",
    ">>> 2 + 2\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "0bd2f698",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "20"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    ">>> 50 - 5*6\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "2084554b",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "5.0"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    ">>> (50 - 5*6) / 4   # division always returns a floating point number（除法总是返回一个浮点数，即小数点后一位）\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "7270e0fa",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "1.6"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    ">>> 8 / 5  # division always returns a floating point number（除法总是返回一个浮点数，即小数点后一位）\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "id": "b61d0ec8",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "5.666666666666667"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 除法（/）总是返回一个浮点值。要进行楼层分割并获得整数结果（丢弃任何分数结果），可以使用//运算符；要计算余数，可以使用%。  \n",
    ">>> 17/3   #  classic division returns a float（经典除法返回一个浮点值）"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "42173b9c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "5"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    ">>> 17//3 # floor division discards the fractional part(经典除法保留整数并丢弃小数部分)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "4b30e6b3",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    ">>> 17%3 # the % operator returns the remainder of the division（%运算符返回除法的剩余部分）\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "id": "27610ef7",
   "metadata": {},
   "outputs": [
    {
     "ename": "SyntaxError",
     "evalue": "invalid syntax (<ipython-input-20-a82f39d5f98b>, line 3)",
     "output_type": "error",
     "traceback": [
      "\u001b[1;36m  File \u001b[1;32m\"<ipython-input-20-a82f39d5f98b>\"\u001b[1;36m, line \u001b[1;32m3\u001b[0m\n\u001b[1;33m    >>> 'spam eggs'  # single quotes\u001b[0m\n\u001b[1;37m    ^\u001b[0m\n\u001b[1;31mSyntaxError\u001b[0m\u001b[1;31m:\u001b[0m invalid syntax\n"
     ]
    }
   ],
   "source": [
    "#字符串（Strings）除了数字，Python还可以操作字符串，字符串可以用几种方式表示。[感觉鸡肋。]\n",
    "#它们可以用单引号（'…'）或双引号（“…”）括起来，结果相同。\n",
    "#（\\）可以用来转义引号。\n",
    ">>> 'spam eggs'  # single quotes\n",
    "'spam eggs'\n",
    ">>> 'doesn\\'t'  # use \\' to escape the single quote...\n",
    "\"doesn't\"\n",
    ">>> \"doesn't\"  # ...or use double quotes instead\n",
    "\"doesn't\"\n",
    ">>> '\"Yes,\" they said.'\n",
    "'\"Yes,\" they said.'\n",
    ">>> \"\\\"Yes,\\\" they said.\"\n",
    "'\"Yes,\" they said.'\n",
    ">>> '\"Isn\\'t,\" they said.'\n",
    "'\"Isn\\'t,\" they said.'"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "id": "d23ce1c9",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "\"doesn't\""
      ]
     },
     "execution_count": 24,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    ">>> 'doesn\\'t' \n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "3a9ab1c8",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.8"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": true
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
